package rainbowPackage;

import javafx.scene.paint.Paint.*;
import javafx.scene.image.PixelReader;
import javafx.scene.paint.Color;
import java.awt.Dimension;

public class RainbowSoft2D //RainbowSoft2D Houses A Series Of RainbowVideo.java Videos Or RainbowColorCodeSchemes.java For Frames

//FOR RainbowColorCodeSchemes.java! To Use RainbowSoftColorCodes And Access RainbowPattern2D.java Classes. This Class RainbowSoft2D Deals With Color Coding On 1 Layers To Make A Frame For RainbowVideo.java Which Accesses
{						   //This Class
	public double[] rgb = {0,0,0}, argb = {0,0,0,1};
	public Color fxColor;
	public Color[] fxColorArray = { fxColor.PINK, fxColor.SKYBLUE };
	//public TransparencySlider tempTransparencySlider = new TransparencySlider();
	public RainbowSoftColorCodesSets rainbowSoftColorCodesSets;
	public double ColorBeingChecked = 0, OpacityBeingChecked = 1, sliderValue = 0, originalFormulaValue = 0, numberOfTransitions = 0, coreVariableStill = 0, coreTranisitionVariable = 0;
	public RainbowSoftColor rainbowSoftColor = new RainbowSoftColor( new double[]{0,0,0,1} );
	public RainbowPattern2D pattern2D = new RainbowPattern2D( new double[]{0,0,0,1} );
	//public boolean someTargetColorHit = true, someTargetColorInTheCenterHit = false, greenBlueGreenUsed = false, otherBrowserColorHit = false, makePixelTransparent = false, aColorBarHit = false, aWheelDiamondHit = false, wheelTipsHit = false;
	static final int maxIndexOfHorizontalColorBars = 17, maxIndexOfVerticalColorBars = 3;
	int colorBarIndex = 0, colorBarCheck = 0, colorBarDistance = 0, eightColorDiamondsIndexStill = 0, eightColorDiamondsIndexMoving = 0, eightColorDiamondsIndex = 0;

	public RainbowSoft2D( Color FXColor )//Creates Class And Sets Color With JavaFX Color Class //
	{
		fxColor = FXColor;
		rainbowSoftColor = new RainbowSoftColor( FXColor );
		rgb = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255 };
		argb = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255, FXColor.getOpacity() };
	}
	public RainbowSoft2D( double[] ARGB )//Creates Class And Sets Color With ARGB //
	{
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(ARGB[z]);
			argb[z] = ColorValueFitter(ARGB[z]);
		}
		if ( ARGB.length == 3 )
		{
			argb = new double[4];
			for  (int z = 0; z <= 2; z++)
				argb[z] = ColorValueFitter(rgb[z]);
			ARGB[3] = 1;
		}
		else
			argb[3] = OpacityValueFitter(ARGB[3]);
		rainbowSoftColor = new RainbowSoftColor( argb );
		fxColor = rainbowSoftColor.ToFXColor();
	}
	public RainbowSoft2D()//Creates Class And Sets Color To Opake Black //
	{
		rgb = new double[]{0,0,0};
		argb = new double[]{0,0,0,1};
		rainbowSoftColor = new RainbowSoftColor( rgb );
		fxColor = rainbowSoftColor.ToFXColor();
	}
	public Color ToFXColor ()//Returns Color In JavaFX
	{
		fxColor = rainbowSoftColor.ToFXColor();
		//return VibrantColors.Red.ToFXColor();//TESTING ONLY
		return fxColor;
		//return fxColor;
	}
	public Color ToFXColor ( double[] ARGB )//Changes Class To ARGB Value And Returns Color In JavaFX //
	{
		for  (int z = 0; z <= 2; z++)
		{
			rgb[z] = ColorValueFitter(ARGB[z]);
			argb[z] = ColorValueFitter(ARGB[z]);
		}
		if ( ARGB.length == 3 )
		{
			argb = new double[4];
			for  (int z = 0; z <= 2; z++)
				argb[z] = ColorValueFitter(rgb[z]);
			ARGB[3] = 1;
		}
		else
			argb[3] = OpacityValueFitter(ARGB[3]);
		rainbowSoftColor = new RainbowSoftColor( argb );
		fxColor = rainbowSoftColor.ToFXColor();
		return fxColor;
	}
	public Color Buddhism(double ColorsFactor, double LocationOfStillMovement, double SliderInterval, double LocationOfColorMovement, int x, int y, double RepeatFactor, double LengthOfColorBar, double SpiralFactor, double NumberOfSpirals, double SuckInExponentialness, double HalfSreenDiagionalLength, boolean Reversed, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter, boolean Adjusted, PixelReader BasisPR, PixelReader OrigionalPR, Dimension Dim, String TypeOfDisplay, Color ColorTooSimilarReplacementColor, double ColorDifference )
	{
		Dimension HalfedDim = new Dimension();
		HalfedDim.width = Math.round( ( Dim.width + 1 ) / 2 - 1 );//Check Into If This Is Right
		HalfedDim.height = Math.round( ( Dim.height + 1 ) / 2 - 1 );//Check Into If This Is Right
		double radialDistance = Math.pow(Math.pow(HalfedDim.width + 1, 2) + Math.pow(HalfedDim.height + 1, 2), 0.5), rainbowIntervalVariable = 0;
		double fullAngle = Math.PI * radialDistance;
		double colorDisplacement = 0;
		double chrysanthemumRadius = 60;
		double radialVariableDistance = 0;//Comment Out For  Ghetto Many Rainbow Clocks
		double angleVariableStill = 0;//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
		double radiusVariableStill = 0;//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
		double angleVariableTransitioning = 0;//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
		double radiusVariableTransitioning = 0;//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
		int outerRingRadius = 293, outerRingThickness = 72, middleRingRadius = 88, middleRingThickness = 20, innerRingRadius = 66, innerRingThickness = 18;//outerRingThickness = 65;

		boolean someTargetColorHit = true, someTargetColorInTheCenterHit = false, greenBlueGreenUsed = false, otherBrowserColorHit = false,	makePixelTransparent = false, aWheelDiamondHit = false,	wheelTipsHit = false;
		//aColorBarHit = false;
		//System.out.println("x: " + x + " y: " + y + " BasisPR.getColor( x, y ): " + BasisPR.getColor( x, y ) );
		int transparentNum = 0;
		for ( colorBarIndex = 0; colorBarIndex <= maxIndexOfHorizontalColorBars; colorBarIndex++)
		{
			//System.out.println("x: " + x + " y: " + y + " BasisPR.getColor( x, y ): " + BasisPR.getColor( x, y ) + " Color: " + rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToFXColor() );
			//tempTransparencySlider = rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex);
			//System.out.println("x: " + x + " y: " + y + " BasisPR.getColor( x, y ): " + BasisPR.getColor( x, y ));
			//System.out.println("colorBarIndex: " + colorBarIndex);
			//System.out.println("rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex): " + rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex) );
			//System.out.println("rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToARGBcolorNum(): " + rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToARGBcolorNum());
			//System.out.println( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToFXColor() );
			if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToFXColor().getOpacity() &&
				 BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToFXColor().getRed() &&
				 BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToFXColor().getGreen() &&
				 BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToFXColor().getBlue() )
			{
				//System.out.println("x: " + x + " y: " + y + " BasisPR.getColor( x, y ): " + BasisPR.getColor( x, y ) + " Color: " + rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToFXColor() );
				colorBarDistance = 0;
				for ( colorBarCheck = x; colorBarCheck >= 0; colorBarCheck--)
				{
					if ( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.buddhismSchemeSet.blackBlue(colorBarIndex).ToFXColor() )
						colorBarDistance++;
					else
						break;
				}
				if ( colorBarIndex == 17 )
					colorBarDistance = colorBarDistance + 8;
				coreVariableStill = colorBarDistance - Math.pow( LocationOfStillMovement / SliderInterval * ( colorBarIndex + 1 ) , SuckInExponentialness );
				coreTranisitionVariable = colorBarDistance - Math.pow( LocationOfColorMovement / SliderInterval * ( colorBarIndex + 1 ) , SuckInExponentialness );
				pattern2D.SimpleRainbow(ColorsFactor / SliderInterval, coreVariableStill, coreTranisitionVariable, LengthOfColorBar, RepeatFactor / SliderInterval );
				rainbowSoftColor = new RainbowSoftColor( pattern2D.ToFXColor() );
				//rainbowSoftColor = new RainbowSoftColor(  VibrantColors.Red.ToFXColor() );//TESTING ONLY
				rgb = rainbowSoftColor.rgb;
				argb = rainbowSoftColor.argb;
				fxColor = rainbowSoftColor.ToFXColor();
				return fxColor;
			}
			else if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackRed(colorBarIndex).ToFXColor().getOpacity() &&
					  BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackRed(colorBarIndex).ToFXColor().getRed() &&
					  BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackRed(colorBarIndex).ToFXColor().getGreen() &&
					  BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackRed(colorBarIndex).ToFXColor().getBlue() )
			{
				colorBarDistance = 0;
				for ( colorBarCheck = x; colorBarCheck <= Dim.width; colorBarCheck++)
				{
					if ( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.buddhismSchemeSet.blackRed(colorBarIndex).ToFXColor() )
						colorBarDistance++;
					else
						break;
				}
				if ( colorBarIndex == 17 )
					colorBarDistance = colorBarDistance + 8;
				coreVariableStill = colorBarDistance - Math.pow( LocationOfStillMovement / SliderInterval * ( colorBarIndex + 1 ) , SuckInExponentialness );
				coreTranisitionVariable = colorBarDistance - Math.pow( LocationOfColorMovement / SliderInterval * ( colorBarIndex + 1 ) , SuckInExponentialness );
				pattern2D.SimpleRainbow(ColorsFactor / SliderInterval, coreVariableStill, coreTranisitionVariable, LengthOfColorBar, RepeatFactor / SliderInterval );
				rainbowSoftColor = new RainbowSoftColor( pattern2D.ToFXColor() );
				rgb = rainbowSoftColor.rgb;
				argb = rainbowSoftColor.argb;
				fxColor = rainbowSoftColor.ToFXColor();
				return fxColor;
			}
		}
		//System.out.println("Got Past blackRed");
		for ( colorBarIndex = 0; colorBarIndex <= maxIndexOfVerticalColorBars; colorBarIndex++)
			if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackGreen(colorBarIndex).ToFXColor().getOpacity() &&
				 BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackGreen(colorBarIndex).ToFXColor().getRed() &&
				 BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackGreen(colorBarIndex).ToFXColor().getGreen() &&
				 BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackGreen(colorBarIndex).ToFXColor().getBlue() )
			{
				colorBarDistance = 0;
				for ( colorBarCheck = y; colorBarCheck >= 0; colorBarCheck--)
				{
					if ( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.buddhismSchemeSet.blackGreen(colorBarIndex).ToFXColor() )
						colorBarDistance++;
					else
						break;
				}
				coreVariableStill = colorBarDistance - Math.pow( LocationOfStillMovement / SliderInterval * ( colorBarIndex + 1 ) , SuckInExponentialness );
				coreTranisitionVariable = colorBarDistance - Math.pow( LocationOfColorMovement / SliderInterval * ( colorBarIndex + 1 ) , SuckInExponentialness );
				pattern2D.SimpleRainbow(ColorsFactor / SliderInterval, coreVariableStill, coreTranisitionVariable, LengthOfColorBar, RepeatFactor / SliderInterval );
				rainbowSoftColor = new RainbowSoftColor( pattern2D.ToFXColor() );
				rgb = rainbowSoftColor.rgb;
				argb = rainbowSoftColor.argb;
				fxColor = rainbowSoftColor.ToFXColor();
				return fxColor;
			}
			else if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackPurple(colorBarIndex).ToFXColor().getOpacity() &&
					  BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackPurple(colorBarIndex).ToFXColor().getRed() &&
					  BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackPurple(colorBarIndex).ToFXColor().getGreen() &&
					  BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.blackPurple(colorBarIndex).ToFXColor().getBlue() )
			{
				colorBarDistance = 0;
				for ( colorBarCheck = y; colorBarCheck <= Dim.height; colorBarCheck++)
				{
					if ( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.buddhismSchemeSet.blackPurple(colorBarIndex).ToFXColor() )
						colorBarDistance++;
					else
						break;
				}
				coreVariableStill = colorBarDistance - Math.pow( LocationOfStillMovement / SliderInterval * ( colorBarIndex + 1 ) , SuckInExponentialness );
				coreTranisitionVariable = colorBarDistance - Math.pow( LocationOfColorMovement / SliderInterval * ( colorBarIndex + 1 ) , SuckInExponentialness );
				pattern2D.SimpleRainbow(ColorsFactor / SliderInterval, coreVariableStill, coreTranisitionVariable, LengthOfColorBar, RepeatFactor / SliderInterval );
				rainbowSoftColor = new RainbowSoftColor( pattern2D.ToFXColor() );
				rgb = rainbowSoftColor.rgb;
				argb = rainbowSoftColor.argb;
				fxColor = rainbowSoftColor.ToFXColor();
				return fxColor;
			}
		//System.out.println("Got Past blackPurple");
		if ( OrigionalPR.getColor( x, y ).getOpacity() != VibrantColors.Magenta.ToFXColor().getOpacity() && OrigionalPR.getColor( x, y ).getOpacity() != VibrantColors.White.ToFXColor().getOpacity() && OrigionalPR.getColor( x, y ).getOpacity() != 0 &&
			 OrigionalPR.getColor( x, y ).getRed() != VibrantColors.Magenta.ToFXColor().getRed() && OrigionalPR.getColor( x, y ).getRed() != VibrantColors.White.ToFXColor().getRed() && 
			 OrigionalPR.getColor( x, y ).getGreen() != VibrantColors.Magenta.ToFXColor().getGreen() && OrigionalPR.getColor( x, y ).getGreen() != VibrantColors.White.ToFXColor().getGreen() &&
			 OrigionalPR.getColor( x, y ).getBlue() != VibrantColors.Magenta.ToFXColor().getBlue() && OrigionalPR.getColor( x, y ).getBlue() != VibrantColors.White.ToFXColor().getBlue() )
		{
			otherBrowserColorHit = true;
		}
		else if ( BasisPR.getColor( x, y ).getOpacity() == VibrantColors.OxylBlue.ToFXColor().getOpacity() &&
				  BasisPR.getColor( x, y ).getRed() == VibrantColors.OxylBlue.ToFXColor().getRed() &&
				  BasisPR.getColor( x, y ).getGreen() == VibrantColors.OxylBlue.ToFXColor().getGreen() &&
				  BasisPR.getColor( x, y ).getBlue() == VibrantColors.OxylBlue.ToFXColor().getBlue() )
			{
				coreVariableStill = ( ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) * radialDistance ) / 2 + LocationOfStillMovement;
				coreTranisitionVariable = ( ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) * radialDistance ) / 2 + LocationOfColorMovement;
				if (coreVariableStill < 0)
					coreVariableStill = coreVariableStill + fullAngle;
				else if (coreVariableStill > fullAngle)
						coreVariableStill = coreVariableStill - fullAngle;
				if (coreTranisitionVariable < 0)
					coreTranisitionVariable = coreTranisitionVariable + fullAngle;
				else if (coreTranisitionVariable > fullAngle)
						coreTranisitionVariable = coreTranisitionVariable - fullAngle;
				rainbowIntervalVariable = fullAngle;
			}
			else if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelDiamonds().ToFXColor().getOpacity() &&
					  BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelDiamonds().ToFXColor().getRed() &&
					  BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelDiamonds().ToFXColor().getGreen() &&
					  BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelDiamonds().ToFXColor().getBlue() )
				{
					if ( ( y - HalfedDim.height ) < - HalfedDim.height / 10)
					{
						if ( ( x - HalfedDim.width ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) > - HalfedDim.height / 10 ) 
							eightColorDiamondsIndexStill = 0;
						else if ( ( x - HalfedDim.width ) + ( y - HalfedDim.height ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) + ( y - HalfedDim.height ) > - HalfedDim.height / 10 )
								eightColorDiamondsIndexStill = 1;
							else if ( ( x - HalfedDim.width ) - ( y - HalfedDim.height ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) - ( y - HalfedDim.height ) > - HalfedDim.height / 10 )
									eightColorDiamondsIndexStill = 7;
					}
					else if ( ( y - HalfedDim.height ) > HalfedDim.height / 10)
						{
							if ( ( x - HalfedDim.width ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) > - HalfedDim.height / 10)
								eightColorDiamondsIndexStill = 4;
							else
								if ( ( x - HalfedDim.width ) - ( y - HalfedDim.height ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) - ( y - HalfedDim.height ) > - HalfedDim.height / 10 )	
									eightColorDiamondsIndexStill = 3;
								else
									if ( ( x - HalfedDim.width ) + ( y - HalfedDim.height ) < HalfedDim.height / 10 && ( x - HalfedDim.width ) + ( y - HalfedDim.height ) > - HalfedDim.height / 10 )
										eightColorDiamondsIndexStill = 5;
						}
						else
							if ( x - HalfedDim.width > 0 )
								eightColorDiamondsIndexStill = 2;
							else
								if ( x - HalfedDim.width < 0 )
									eightColorDiamondsIndexStill = 6;
					eightColorDiamondsIndexMoving = eightColorDiamondsIndexStill;
					eightColorDiamondsIndexStill = (int)Math.ceil( eightColorDiamondsIndexStill - 8 * LocationOfStillMovement / fullAngle );
					eightColorDiamondsIndexMoving = (int)Math.ceil( eightColorDiamondsIndexMoving - 8 * LocationOfColorMovement / fullAngle );
					while ( eightColorDiamondsIndexStill < 0 )
						eightColorDiamondsIndexStill = eightColorDiamondsIndexStill + 8;
					while ( eightColorDiamondsIndexStill > 7 )
						eightColorDiamondsIndexStill = eightColorDiamondsIndexStill - 8;
					while ( eightColorDiamondsIndexMoving < 0 )
						eightColorDiamondsIndexMoving = eightColorDiamondsIndexMoving + 8;
					while ( eightColorDiamondsIndexMoving > 7 )
						eightColorDiamondsIndexMoving = eightColorDiamondsIndexMoving - 8;
					eightColorDiamondsIndex = eightColorDiamondsIndexStill + eightColorDiamondsIndexMoving;//CHECK ME MAY BE - Instead Of +
					while ( eightColorDiamondsIndex < 0 )
						eightColorDiamondsIndex = eightColorDiamondsIndex + 8;
					while ( eightColorDiamondsIndex > 7 )
						eightColorDiamondsIndex = eightColorDiamondsIndex - 8;
					aWheelDiamondHit = true;
				}
				else if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelRods().ToFXColor().getOpacity() &&
						  BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelRods().ToFXColor().getRed() &&
						  BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelRods().ToFXColor().getGreen() &&
						  BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelRods().ToFXColor().getBlue() )
					{
						coreVariableStill = ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) * radialDistance ) + LocationOfStillMovement / 16;
						coreTranisitionVariable = ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) * radialDistance ) + LocationOfColorMovement / 16;
						while ( coreVariableStill < 0 )
							coreVariableStill = coreVariableStill + fullAngle / 8;
						while ( coreVariableStill > fullAngle / 8)
							coreVariableStill = coreVariableStill - fullAngle / 8;
						while ( coreTranisitionVariable < 0 )
							coreTranisitionVariable = coreTranisitionVariable + fullAngle / 8;
						while ( coreTranisitionVariable > fullAngle / 8)
							coreTranisitionVariable = coreTranisitionVariable - fullAngle / 8;
						rainbowIntervalVariable = fullAngle / 8;
					}
					else if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelEnds().ToFXColor().getOpacity() &&
							  BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelEnds().ToFXColor().getRed() &&
							  BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelEnds().ToFXColor().getGreen() &&
							  BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelEnds().ToFXColor().getBlue() )
						{
							coreVariableStill = ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) * radialDistance ) - LocationOfStillMovement / 16;
							coreTranisitionVariable = ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) * radialDistance ) - LocationOfColorMovement / 16;
							while ( coreVariableStill < 0 )
								coreVariableStill = coreVariableStill + fullAngle / 8;
							while ( coreVariableStill > fullAngle / 8)
								coreVariableStill = coreVariableStill - fullAngle / 8;
							while ( coreTranisitionVariable < 0 )
								coreTranisitionVariable = coreTranisitionVariable + fullAngle / 8;
							while ( coreTranisitionVariable > fullAngle / 8)
								coreTranisitionVariable = coreTranisitionVariable - fullAngle / 8;
							rainbowIntervalVariable =  fullAngle / 8;
						}
						else if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelOuterRing().ToFXColor().getOpacity() &&
								  BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelOuterRing().ToFXColor().getRed() &&
								  BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelOuterRing().ToFXColor().getGreen() &&
								  BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelOuterRing().ToFXColor().getBlue() )
							{
								coreVariableStill = outerRingRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + outerRingThickness * LocationOfStillMovement / fullAngle;
								coreTranisitionVariable = outerRingRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + outerRingThickness * LocationOfColorMovement / fullAngle;
								while ( coreVariableStill < outerRingThickness )
									coreVariableStill = coreVariableStill + outerRingThickness;
								while ( coreVariableStill > outerRingThickness )
									coreVariableStill = coreVariableStill - outerRingThickness;
								while ( coreTranisitionVariable < outerRingThickness )
									coreTranisitionVariable = coreTranisitionVariable + outerRingThickness;
								while ( coreTranisitionVariable > outerRingThickness )
									coreTranisitionVariable = coreTranisitionVariable - outerRingThickness;
								rainbowIntervalVariable = outerRingThickness;
							}
							else if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelMiddleRing().ToFXColor().getOpacity() &&
									  BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelMiddleRing().ToFXColor().getRed() &&
									  BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelMiddleRing().ToFXColor().getGreen() &&
									  BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelMiddleRing().ToFXColor().getBlue() )
								{
									coreVariableStill = middleRingRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + 2 * middleRingThickness * LocationOfStillMovement / fullAngle;
									coreTranisitionVariable = middleRingRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + 2 * middleRingThickness * LocationOfColorMovement / fullAngle;
									while ( coreVariableStill < middleRingThickness )
										coreVariableStill = coreVariableStill + middleRingThickness;
									while ( coreVariableStill > middleRingThickness )
										coreVariableStill = coreVariableStill - middleRingThickness;
									while ( coreTranisitionVariable < middleRingThickness )
										coreTranisitionVariable = coreTranisitionVariable + middleRingThickness;
									while ( coreTranisitionVariable > middleRingThickness )
										coreTranisitionVariable = coreTranisitionVariable - middleRingThickness;
									rainbowIntervalVariable = middleRingThickness;
								}
								else if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelInnerRing().ToFXColor().getOpacity() &&
										  BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelInnerRing().ToFXColor().getRed() &&
										  BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelInnerRing().ToFXColor().getGreen() &&
										  BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelInnerRing().ToFXColor().getBlue() )
									{
										coreVariableStill = innerRingRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + 4 * innerRingThickness * LocationOfStillMovement / fullAngle;
										coreTranisitionVariable = innerRingRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + 4 * innerRingThickness * LocationOfColorMovement / fullAngle;
										while ( coreVariableStill < innerRingThickness )
											coreVariableStill = coreVariableStill + innerRingThickness;
										while ( coreVariableStill > innerRingThickness )
											coreVariableStill = coreVariableStill - innerRingThickness;
										while ( coreTranisitionVariable < innerRingThickness )
											coreTranisitionVariable = coreTranisitionVariable + innerRingThickness;
										while ( coreTranisitionVariable > innerRingThickness )
											coreTranisitionVariable = coreTranisitionVariable - innerRingThickness;
										rainbowIntervalVariable = innerRingThickness;
									}
									else if ( BasisPR.getColor( x, y ).getOpacity() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelTips().ToFXColor().getOpacity() &&
											  BasisPR.getColor( x, y ).getRed() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelTips().ToFXColor().getRed() &&
											  BasisPR.getColor( x, y ).getGreen() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelTips().ToFXColor().getGreen() &&
											  BasisPR.getColor( x, y ).getBlue() == rainbowSoftColorCodesSets.buddhismSchemeSet.wheelTips().ToFXColor().getBlue() )
											wheelTipsHit = true;
										else
											if ( Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y  - HalfedDim.height + 1, 2), 0.5) <= 47 )
											{
												radialVariableDistance = Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5);//Comment Out For  Ghetto Many Rainbow Clocks
												angleVariableStill =  chrysanthemumRadius * ( ( - Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1) ) + Math.PI ) - 6 * Math.PI * LocationOfStillMovement / ( fullAngle / 10 ) );//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
												radiusVariableStill = chrysanthemumRadius * ( radialVariableDistance * 24.6 + colorDisplacement + angleVariableStill);//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
												angleVariableTransitioning =  chrysanthemumRadius * ( ( - Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1) ) + Math.PI ) - 6 * Math.PI * LocationOfColorMovement / ( fullAngle / 10 ) );//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
												radiusVariableTransitioning = chrysanthemumRadius * ( radialVariableDistance * 24.6 + colorDisplacement + angleVariableTransitioning);//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
												while ( radiusVariableStill < colorDisplacement)//For Rainbow Ring
													radiusVariableStill = radiusVariableStill + 2 * Math.PI * chrysanthemumRadius - colorDisplacement;//BAD COMMENT: For Rainbow Ring Take Out - 38
												while ( radiusVariableStill > 2 * Math.PI * chrysanthemumRadius )
													radiusVariableStill = radiusVariableStill - 2 * Math.PI * chrysanthemumRadius - colorDisplacement;
												while ( radiusVariableTransitioning < colorDisplacement)//For Rainbow Ring
													radiusVariableTransitioning = radiusVariableTransitioning + 2 * Math.PI * chrysanthemumRadius - colorDisplacement;//BAD COMMENT: For Rainbow Ring Take Out - 38
												while ( radiusVariableTransitioning > 2 * Math.PI * chrysanthemumRadius )
													radiusVariableTransitioning = radiusVariableTransitioning - 2 * Math.PI * chrysanthemumRadius - colorDisplacement;
												rainbowIntervalVariable = 2 * Math.PI * chrysanthemumRadius;
												coreVariableStill = radiusVariableStill;
												coreTranisitionVariable = radiusVariableTransitioning;
											}
											else
												someTargetColorInTheCenterHit = false;
		//End Of Basis Image Switch System
		if ( OrigionalPR.getColor( x, y ).getOpacity() == VibrantColors.OxylBlue0FF.ToFXColor().getOpacity() && 
			 OrigionalPR.getColor( x, y ).getRed() == VibrantColors.OxylBlue0FF.ToFXColor().getRed() && 
			 OrigionalPR.getColor( x, y ).getGreen() == VibrantColors.OxylBlue0FF.ToFXColor().getGreen() && 
			 OrigionalPR.getColor( x, y ).getBlue() == VibrantColors.OxylBlue0FF.ToFXColor().getBlue() )
			//if ( BasisPR.getColor( x, y ) != neonGreenNum && neonGreenCheck.ColorTooSimilarFunction( oxylBlue0FFNum, BasisPR.getColor( x, y ) ) )//OrigionalPR.getColor( x, y ) , 
			//		pw.setArgb( x, y, neonGreenNum);//shitBrownNum);//pr.getColor( x, y ) );
			//	else
		{
			rainbowSoftColor = new RainbowSoftColor( VibrantColors.OxylBlue0FF.ToFXColor() );
			rgb = rainbowSoftColor.rgb;
			argb = rainbowSoftColor.argb;
			fxColor = rainbowSoftColor.ToFXColor();
			return fxColor;
			//pw.setArgb( x, y, VibrantColors.OxylBlue0FF.ToFXColor());
		}
		else
			//if (otherBrowserColorHit == true)
			//		pw.setArgb( x, y, OrigionalPR.getColor( x, y ) );
			//	else
			//		if (makePixelTransparent == true)
			//			pw.setArgb( x, y, transparentNum );
			//		else
			//			if ( greenBlueGreenUsed == false )// */
			if ( aWheelDiamondHit == true)
				if ( OrigionalPR.getColor( x, y ).getOpacity() == VibrantColors.Magenta.ToFXColor().getOpacity() && 
					 OrigionalPR.getColor( x, y ).getRed() == VibrantColors.Magenta.ToFXColor().getRed() && 
					 OrigionalPR.getColor( x, y ).getGreen() == VibrantColors.Magenta.ToFXColor().getGreen() && 
					 OrigionalPR.getColor( x, y ).getBlue() == VibrantColors.Magenta.ToFXColor().getBlue() )//shitBrownNum )
				{
					rainbowSoftColor = new RainbowSoftColor(  VibrantColors.Magenta.ToFXColor() );
					rgb = rainbowSoftColor.rgb;
					argb = rainbowSoftColor.argb;
					fxColor = rainbowSoftColor.ToFXColor();
					return fxColor;
					//pw.setArgb( x, y, magentaNum );
				}
				else
				{
					rainbowSoftColor = new RainbowSoftColor( rainbowSoftColorCodesSets.buddhismSchemeSet.wheelDiamondsArray(eightColorDiamondsIndex).ToFXColor() );
					rgb = rainbowSoftColor.rgb;
					argb = rainbowSoftColor.argb;
					fxColor = rainbowSoftColor.ToFXColor();
					return fxColor;
					//pw.setArgb( x, y, wheelDiamondsArrayNum[eightColorDiamondsIndex] );
				}
			else if ( wheelTipsHit == true)
					if ( coreVariableStill + coreTranisitionVariable <= fullAngle - 8.468 * SliderInterval )//CHECK ME FOR WORKING PROPERLY MAY NEED '-'
					{
						rainbowSoftColor = new RainbowSoftColor( VibrantColors.Green.ToFXColor() );
						rgb = rainbowSoftColor.rgb;
						argb = rainbowSoftColor.argb;
						fxColor = rainbowSoftColor.ToFXColor();
						return fxColor;
						//pw.setArgb( x, y, greenNum );
					}
					else
					{
						rainbowSoftColor = new RainbowSoftColor( VibrantColors.Red.ToFXColor() );
						rgb = rainbowSoftColor.rgb;
						argb = rainbowSoftColor.argb;
						fxColor = rainbowSoftColor.ToFXColor();
						return fxColor;
						//pw.setArgb( x, y, redNum );
					}
				else//NEEEEEEDS DEFINITE WORK BELOW I THINK JUST GOT IT SO IT WOULD COMPILE MAY ALL NEED TO BE REDIVISED TO USE RAINBOW PATTERN
					if ( someTargetColorHit == true)//numberOfClockHandsForOrderOfMagi  //greenBlueGreenUsed
						if ( OrigionalPR.getColor( x, y ).getOpacity() == VibrantColors.Magenta.ToFXColor().getOpacity() && 
							 OrigionalPR.getColor( x, y ).getRed() == VibrantColors.Magenta.ToFXColor().getRed() && 
							 OrigionalPR.getColor( x, y ).getGreen() == VibrantColors.Magenta.ToFXColor().getGreen() && 
							 OrigionalPR.getColor( x, y ).getBlue() == VibrantColors.Magenta.ToFXColor().getBlue() )//if ( OrigionalPR.getColor( x, y ) == VibrantColors.Magenta.ToFXColor() )//shitBrownNum )//OrigionalPR.getArgb(x, y) == magentaNum )// == magecoreVariable// == webBlackNum
							rainbowSoftColor.RainbowSoftColorRainbowFunctionReverseAdjusted(rainbowIntervalVariable, coreVariableStill + coreTranisitionVariable, 1, 2);//Highest int = 2,147,483,647
						else
							rainbowSoftColor.RainbowSoftColorRainbowFunctionAdjusted(rainbowIntervalVariable, coreVariableStill + coreTranisitionVariable, 1, 0);
					else if ( OrigionalPR.getColor( x, y ).getOpacity() != VibrantColors.Magenta.ToFXColor().getOpacity() && BasisPR.getColor( x, y ).getOpacity() != VibrantColors.Green.ToFXColor().getOpacity() &&
							 OrigionalPR.getColor( x, y ).getRed() != VibrantColors.Magenta.ToFXColor().getRed() && BasisPR.getColor( x, y ).getRed() != VibrantColors.Green.ToFXColor().getRed() && 
							 OrigionalPR.getColor( x, y ).getGreen() != VibrantColors.Magenta.ToFXColor().getGreen() && BasisPR.getColor( x, y ).getGreen() != VibrantColors.Green.ToFXColor().getGreen() && 
							 OrigionalPR.getColor( x, y ).getBlue() != VibrantColors.Magenta.ToFXColor().getBlue() && BasisPR.getColor( x, y ).getBlue() != VibrantColors.Green.ToFXColor().getBlue() )//shitBrownNum )
						{
							int tempColor = BasisPR.getArgb( x, y );
							int colorA = (tempColor >> 24) & 0xff;
							int colorR = (tempColor >> 16) & 0xff;
							int colorG = (tempColor >> 8) & 0xff;
							int colorB = (tempColor) & 0xff;
							rainbowSoftColor = new RainbowSoftColor( new double [] { colorA, colorR, colorG, colorB } );
							rgb = rainbowSoftColor.rgb;
							argb = rainbowSoftColor.argb;
							fxColor = rainbowSoftColor.ToFXColor();
							return fxColor;
							//pw.setArgb( x, y, BasisPR.getColor( x, y ) );
						}
						else
							if ( rainbowSoftColor.ColorTooSimilarFunction( VibrantColors.NeonGreen.ToFXColor(), BasisPR.getColor( x, y ) ) )//OrigionalPR.getColor( x, y ) , 
							{
								rainbowSoftColor = new RainbowSoftColor( VibrantColors.SkyBlue.ToFXColor() );
								rgb = rainbowSoftColor.rgb;
								argb = rainbowSoftColor.argb;
								fxColor = rainbowSoftColor.ToFXColor();
								return fxColor;
								//pw.setArgb( x, y, VibrantColors.SkyBlue.ToFXColor());//shitBrownNum);//pr.getColor( x, y ) );
							}
							else
							{
								rainbowSoftColor = new RainbowSoftColor( VibrantColors.NeonGreen.ToFXColor() );
								rgb = rainbowSoftColor.rgb;
								argb = rainbowSoftColor.argb;
								fxColor = rainbowSoftColor.ToFXColor();
								return fxColor;
								//pw.setArgb( x, y, VibrantColors.NeonGreen.ToFXColor());// */
							}
		//pattern2D.SimpleRainbow(ColorsFactor / SliderInterval, coreVariable, coreTranisitionVariable, LengthOfColorBar, RepeatFactor / SliderInterval);
		rainbowSoftColor = new RainbowSoftColor( new double[] { 255 * BasisPR.getColor( x, y ).getRed(), 255 * BasisPR.getColor( x, y ).getGreen(), 255 * BasisPR.getColor( x, y ).getBlue(), BasisPR.getColor( x, y ).getOpacity() } );
		rgb = rainbowSoftColor.rgb;
		argb = rainbowSoftColor.argb;
		fxColor = rainbowSoftColor.ToFXColor();
		return fxColor;
	}
	public Color MagiElite(double ColorsFactor, double LocationOfStillMovement, double LocationOfColorMovement, int x, int y, double RepeatFactor, double SpiralFactor, double NumberOfSpirals, double HalfSreenDiagionalLength, boolean Reversed, double BrightnessMultiplyer, int Gradations, double OpacityBefore, double OpacityAfter, boolean Adjusted, PixelReader BasisPR, PixelReader OrigionalPR, Dimension Dim, String TypeOfDisplay, Color ColorTooSimilarReplacementColor, double ColorDifference )
	{/*
		final double chrysanthemumRadius = 60, chrysanthemumInnerRadius = 9, chrysanthemumYDisplacement = 25, chrysanthemumNumberOfPedals = 16;
		boolean someTargetColorHit = true, someTargetColorInTheCenterHit = false, greenBlueGreenUsed = false;
		Dimension HalfedDim = new Dimension();
		HalfedDim.width = Math.round( ( Dim.width + 1 ) / 2 - 1 );//Check Into If This Is Right
		HalfedDim.height = Math.round( ( Dim.height + 1 ) / 2 - 1 );//Check Into If This Is Right
		if ( Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y  - HalfedDim.height + 1 + chrysanthemumYDisplacement, 2), 0.5) <= 64 )
		{//902 //1019
			someTargetColorInTheCenterHit = true;
			if ( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.magiEliteSchemeSet.black6().ToFXColor() )
			{
				coreVariable = chrysanthemumRadius - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1 + chrysanthemumYDisplacement, 2), 0.5) + 6 * 0.175979734764 * chrysanthemumRadius * xSlider / ( fullAngle / 10 ) ;
				while ( coreVariable < 0.175979734764 * chrysanthemumRadius)
					coreVariable = coreVariable + 0.175979734764 * chrysanthemumRadius;
				while ( coreVariable > 0.175979734764 * chrysanthemumRadius)
					coreVariable = coreVariable - 0.175979734764 * chrysanthemumRadius;
				colorIntervalVariable = 0.175979734764 * chrysanthemumRadius / ( numberOfColorsInTheRainbow - 1 );
			}
			else
				if ( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.magiEliteSchemeSet.white1().ToFXColor() )
				{
					radialVariableDistance = Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1 + chrysanthemumYDisplacement, 2), 0.5);//Comment Out For  Ghetto Many Rainbow Clocks
					angleVariable =  chrysanthemumRadius * ( ( - Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 + chrysanthemumYDisplacement) ) + Math.PI ) - 6 * Math.PI * xSlider / ( fullAngle / 10 ) );//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
					radiusVariable = chrysanthemumRadius * ( radialVariableDistance * 24.6 + colorDisplacement + angleVariable);//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
					while ( radiusVariable < colorDisplacement)//For Rainbow Ring
						radiusVariable = radiusVariable + 2 * Math.PI * chrysanthemumRadius - colorDisplacement;//BAD COMMENT: For Rainbow Ring Take Out - 38
					while ( radiusVariable > 2 * Math.PI * chrysanthemumRadius )
						radiusVariable = radiusVariable - 2 * Math.PI * chrysanthemumRadius - colorDisplacement;
					colorIntervalVariable = 2 * Math.PI * chrysanthemumRadius / ( numberOfColorsInTheRainbow - 1 );
					coreVariable = radiusVariable;
				}
				else
					if ( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.magiEliteSchemeSet.white2().ToFXColor() )
					{
						coreVariable = x - 902 - chrysanthemumRadius * 2 * xSlider / ( fullAngle / 10 );
						while (coreVariable < 0)
							coreVariable = coreVariable + chrysanthemumRadius * 2;
						while (coreVariable > chrysanthemumRadius * 2)
							coreVariable = coreVariable - chrysanthemumRadius * 2;
						colorIntervalVariable = chrysanthemumRadius * 2 / (numberOfColorsInTheRainbow - 1 );
					}
					else
						if ( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.magiEliteSchemeSet.white3().ToFXColor() )
						{
							angleVariable = - chrysanthemumRadius *  2 * Math.PI * ( ( Math.atan2( (x - HalfedDim.width + 1) , ( y - HalfedDim.height + 1 + chrysanthemumYDisplacement ) ) + Math.PI ) + xSlider / ( ( chrysanthemumNumberOfPedals - 1 ) * fullAngle / 10 ) ) ;
							while (angleVariable < 0)
								angleVariable = angleVariable + chrysanthemumRadius / ( chrysanthemumNumberOfPedals - 1);
							while (angleVariable > chrysanthemumRadius / (chrysanthemumNumberOfPedals - 1) )
								angleVariable = angleVariable - chrysanthemumRadius / ( chrysanthemumNumberOfPedals - 1);
							coreVariable = angleVariable;
							colorIntervalVariable = chrysanthemumRadius / ( ( numberOfClockHandsForRainbow - 1 ) * ( chrysanthemumNumberOfPedals - 1) );
						}
						else
							if ( BasisPR.getColor( x, y ) == rainbowSoftColorCodesSets.magiEliteSchemeSet.white4().ToFXColor() )
							{
								radialVariableDistance = Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1 + chrysanthemumYDisplacement, 2), 0.5);//Comment Out For  Ghetto Many Rainbow Clocks
								angleVariable = ( ( - Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 + chrysanthemumYDisplacement) ) + Math.PI ) - 6 * Math.PI * xSlider / ( fullAngle / 10 ) ) * 10 * chrysanthemumRadius;//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
								radiusVariable = ( radialVariableDistance * 24.6 + colorDisplacement + angleVariable ) / ( 2 * chrysanthemumRadius);//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
								while ( radiusVariable < colorDisplacement)//For Rainbow Ring
									radiusVariable = radiusVariable + 2 * chrysanthemumRadius * Math.PI - colorDisplacement;//BAD COMMENT: For Rainbow Ring Take Out - 38
								while ( radiusVariable > 2 * chrysanthemumRadius * Math.PI )
									radiusVariable = 2 * chrysanthemumRadius * Math.PI - colorDisplacement;
								colorIntervalVariable = 2 * chrysanthemumRadius * Math.PI / ( numberOfColorsInTheRainbow - 1 );
								coreVariable = radiusVariable;// / ( Dim.height / 64);
							}
							else
								if ( BasisPR.getColor( x, y ) == VibrantColors.SimpleBlue.ToFXColor() )
								{//951 To 969
									coreVariable = chrysanthemumInnerRadius - Math.pow(Math.pow(x - HalfedDim.width, 2) + Math.pow( y - HalfedDim.height + chrysanthemumYDisplacement, 2), 0.5) + 88 * chrysanthemumInnerRadius * xSlider / ( fullAngle / 10 ) ;
									while ( coreVariable < chrysanthemumInnerRadius)
										coreVariable = coreVariable + chrysanthemumInnerRadius;
									while ( coreVariable > chrysanthemumInnerRadius)
										coreVariable = coreVariable - chrysanthemumInnerRadius;
									colorIntervalVariable = chrysanthemumInnerRadius / ( numberOfColorsInTheRainbow - 1 );
								}
							else
								someTargetColorInTheCenterHit = false;
		}
		if ( someTargetColorInTheCenterHit == false )
			if ( BasisPR.getColor( x, y ) == VibrantColors.OxylBlue.ToFXColor() )
			{
				angleVariable = Math.atan2( (x - HalfedDim.width + 1) , (y - Dim.height * 4 / 3 + 1 ) );// For Rising Sun + 1
				aVariable = ( angleVariable * Math.tan( angleVariable ) )  * radialDistance / 4.46783504 + xSlider;// + Or - xSlider Determines Which Direction It Moves //For Infinite Number Theorem Good a = ( angle * Math.tan( angle ) + Math.PI )  * radialDistance / 4.46783504 - xSlider;  //a = ( angle Math.tan( angle ) + Math.PI )  * radialDistance / 4.46783504 - xSlider;//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals //Use This: "a = ( - angle + Math.PI ) * radialDistance;" Line For Rainbow Clock //a = ( - angle * Math.tan( angle ) + Math.PI ) * radialDistance - xSlider; For Infinite Number Theorem //a = ( - angle * Math.cos( angle ) * Math.sin( angle ) * Math.pow(radialVariableDistance, 2) + Math.PI ) * radialDistance - xSlider;
				//aVariable = ( angleVariable * %/% Math.cos( angle ) * Math.sin( angle ) * Math.pow(radialVariableDistance, 1) %\% Math.tan( angleVariable ) %/%+ Math.PI%\% )  * radialDistance / 4.46783504 + xSlider;// + Or - xSlider Determines Which Direction It Moves //For Infinite Number Theorem Good a = ( angle * %/%Math.cos( angle ) * Math.sin( angle ) * Math.pow(radialVariableDistance, 1)%\% Math.tan( angle ) + Math.PI )  * radialDistance / 4.46783504 - xSlider;  //a = ( angle %/%Math.cos( angle ) * Math.sin( angle ) * Math.pow(radialVariableDistance, 1)%\% Math.tan( angle ) + Math.PI )  * radialDistance / 4.46783504 - xSlider;//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals //Use This: "a = ( - angle + Math.PI ) * radialDistance;" Line For Rainbow Clock //a = ( - angle * Math.tan( angle ) + Math.PI ) * radialDistance - xSlider; For Infinite Number Theorem //a = ( - angle * Math.cos( angle ) * Math.sin( angle ) * Math.pow(radialVariableDistance, 2) + Math.PI ) * radialDistance - xSlider;
				radiusVariable = aVariable * 10;
				// %*%/%//For Old Infinite Number Theorem Use Above
				//radius = a * 10;//For Rainbow Spiral And Clock
				//}
				while ( radiusVariable < colorDisplacementVariable)//For Rainbow Ring
					radiusVariable = radiusVariable + fullAngle - colorDisplacementVariable;//BAD COMMENT: For Rainbow Ring Take Out - 38
				while ( radiusVariable > fullAngle )//radius > fullAngle For Non Infinite Number Theorem
					radiusVariable = radiusVariable - fullAngle - colorDisplacementVariable; //radius = radius - fullAngle; For Non Infinite Number Theorem //For Rainbow Clock Comment Out To Here. Here --
				colorIntervalVariable = colorIntervalForWholeScreen;
				coreVariable = radiusVariable;
			}
			else
				if ( BasisPR.getColor( x, y ) == VibrantColors.SkyBlue.ToFXColor())
				{
					radialVariableDistance = Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5);//Comment Out For  Ghetto Many Rainbow Clocks
					angleVariable = ( ( - Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) - 6 * Math.PI * xSlider / ( fullAngle / 10 ) ) * radialDistance;//Use For Rainbow Spiral Multiply radialDistance By 10 To Increase The Number Of Spirals
					radiusVariable = radialVariableDistance * 24.6 + colorDisplacement + angleVariable;//radialVariableDistance + colorDisplacement + angle;//Remove + angle And Add xSlider To Make Rainbow Clock
					while ( radiusVariable < colorDisplacement)//For Rainbow Ring
						radiusVariable = radiusVariable + fullAngle - colorDisplacement;//BAD COMMENT: For Rainbow Ring Take Out - 38
					while ( radiusVariable > fullAngle )
						radiusVariable = radiusVariable - fullAngle - colorDisplacement;
					colorIntervalVariable = fullAngle / ( numberOfColorsInTheRainbow - 1 );
					coreVariable = radiusVariable;						
				}
				else
					if ( BasisPR.getColor( x, y ) == VibrantColors.Magenta.ToFXColor())
					{
						coreVariable = HalfedDim.height - Math.pow(Math.pow(x - HalfedDim.width + 1, 2) + Math.pow( y - HalfedDim.height + 1, 2), 0.5) + 6 * 0.175979734764 * xSlider * HalfedDim.height / ( fullAngle / 10 ) ;
						while ( coreVariable < 0.175979734764 * HalfedDim.height)
							coreVariable = coreVariable + 0.175979734764 * HalfedDim.height;
						while ( coreVariable > 0.175979734764 * HalfedDim.height)
							coreVariable = coreVariable - 0.175979734764 * HalfedDim.height;
						colorIntervalVariable = 0.175979734764 * HalfedDim.height / ( numberOfColorsInTheRainbow - 1 );
					}
					else
						if ( BasisPR.getColor( x, y ) == VibrantColors.NeonGreen.ToFXColor() )
						{
							angleVariable = radialDistance * ( ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) + 2 * Math.PI * xSlider / ( fullAngle / 10 ) );
							while (angleVariable < 0)
								angleVariable = angleVariable + fullAngle * 2;
							while (angleVariable > fullAngle * 2)
								angleVariable = angleVariable - fullAngle * 2;
							coreVariable = angleVariable;
							colorIntervalVariable = ( 2 * fullAngle ) / ( numberOfClockHandsForRainbow - 1 );
							//angle = 0;//Testing Purposes Only.
						}
						else
							if ( BasisPR.getColor( x, y ) == VibrantColors.HalfGrey.ToFXColor() )
							{
								angleVariable = - radialDistance * ( ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) - 2 * Math.PI * xSlider / ( fullAngle / 10 ) );
								while (angleVariable < 0)
									angleVariable = angleVariable + fullAngle * 2;
								while (angleVariable > fullAngle * 2)
									angleVariable = angleVariable - fullAngle * 2;
								coreVariable = angleVariable;
								colorIntervalVariable = ( 2 * fullAngle ) / ( numberOfClockHandsForRainbow - 1 );
								//angle = 0;//Testing Purposes Only.
							}
							else
								if ( BasisPR.getColor( x, y ) == VibrantColors.Maroon.ToFXColor() )//neonGreenNum)
								{
									angleVariable = - radialDistance * ( ( Math.atan2( (x - HalfedDim.width + 1) , (y - HalfedDim.height + 1 ) ) + Math.PI ) + 2 * Math.PI * xSlider / ( (numberOfClockHandsForOrderOfMagi - 1) * fullAngle / 10 ) );
									while (angleVariable < 0)
										angleVariable = angleVariable + fullAngle * 2 / ( numberOfClockHandsForOrderOfMagi - 1);
									while (angleVariable > fullAngle * 2 / ( numberOfClockHandsForOrderOfMagi - 1) )
										angleVariable = angleVariable - fullAngle * 2 / ( numberOfClockHandsForOrderOfMagi - 1);
									coreVariable = angleVariable;
									colorIntervalVariable = ( 2 * fullAngle ) / ( ( numberOfColorsForOrderOfMagi - 1 ) * ( numberOfClockHandsForOrderOfMagi - 1) );
									//angle = 0;//Testing Purposes Only.
									if ( OrigionalPR.getColor( x, y ) == magenta.ToFXColor() )//shitBrownNum )//OrigionalPR.getArgb(x, y) == magentaNum )// == magecoreVariable// == webBlackNum
										if ( coreVariable < colorIntervalVariable  + colorDisplacement)//For Normal Rainbow Use This Instead Of The Others
											color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorDisplacement, blue, green);
										else
											color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorIntervalVariable - colorDisplacement, green, blue);
									else//
										if ( coreVariable < colorIntervalVariable  + colorDisplacement)//For Normal Rainbow Use This Instead Of The Others
											color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorDisplacement, green, blue);
										else
											color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorIntervalVariable - colorDisplacement, blue, green);//*
									pw.setArgb( x, y, (int)(255 * 16777216 + (int)color.RGB[0] * 65536 + (int)color.RGB[1] * 256 + (int)color.RGB[2]));//setArgb
									greenBlueGreenUsed = true;
								}
								else
									if ( BasisPR.getColor( x, y ) == VibrantColors.Pink.ToFXColor() )
									{//304 + 244 = 548 // 656 //Need Correction For Screen Size !!
										coreVariable = x - 656 - 628 * xSlider / ( fullAngle / 10 );
										while (coreVariable < 0)
											coreVariable = coreVariable + 628;
										while (coreVariable > 628)
											coreVariable = coreVariable - 628;
										colorIntervalVariable =  628 / (numberOfColorsInTheRainbow - 1 );
									}
									else
										someTargetColorHit = false;
		//End Of Basis Image Switch System
		if ( greenBlueGreenUsed == false )
			if ( someTargetColorHit == true)//numberOfClockHandsForOrderOfMagi  //greenBlueGreenUsed
			{
				//	if ( coreVariable >= colorDisplacementVariable && coreVariable < (numberOfColorsInTheRainbow - 1) * colorIntervalVariable  + colorDisplacement)//For Purple Outside Ring
				//{//Retain Below If Else And Use New Variable Names And Equate Them With If Switch Below New Variable Name Comment Above // Make html Text Flip shitBrownNum Color!
				if ( OrigionalPR.getColor( x, y ) == VibrantColors.Magenta.ToFXColor() )//shitBrownNum )//OrigionalPR.getArgb(x, y) == magentaNum )// == magecoreVariable// == webBlackNum
					if ( coreVariable < colorIntervalVariable  + colorDisplacement)//For Normal Rainbow Use This Instead Of The Others
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorDisplacement, purple, blue);
					else if ( coreVariable < ( 2 * colorIntervalVariable  + colorDisplacement) )
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorIntervalVariable - colorDisplacement, blue, teal);
					else if ( coreVariable < ( 3 * colorIntervalVariable  + colorDisplacement) )		
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - 2 * colorIntervalVariable - colorDisplacement, teal, pink);
					else if ( coreVariable < ( 4 * colorIntervalVariable  + colorDisplacement) )
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - 3 * colorIntervalVariable - colorDisplacement, pink, yellow);
					else if ( coreVariable < ( 5 * colorIntervalVariable  + colorDisplacement) )
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - 4 * colorIntervalVariable - colorDisplacement, yellow, orange);
					else
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - 5 * colorIntervalVariable - colorDisplacement, orange, red);
				else//
					if ( coreVariable < colorIntervalVariable  + colorDisplacement)//For Normal Rainbow Use This Instead Of The Others
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorDisplacement, red, orange);
					else if ( coreVariable < ( 2 * colorIntervalVariable  + colorDisplacement) )
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - colorIntervalVariable - colorDisplacement, orange, yellow);
					else if ( coreVariable < ( 3 * colorIntervalVariable  + colorDisplacement) )		
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - 2 * colorIntervalVariable - colorDisplacement, yellow, green);
					else if ( coreVariable < ( 4 * colorIntervalVariable  + colorDisplacement) )
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - 3 * colorIntervalVariable - colorDisplacement, green, teal);
					else if ( coreVariable < ( 5 * colorIntervalVariable  + colorDisplacement) )
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - 4 * colorIntervalVariable - colorDisplacement, teal, blue);
					else
						color.ColorSliderFunction(colorIntervalVariable, coreVariable - 5 * colorIntervalVariable - colorDisplacement, blue, purple);//
				pw.setArgb( x, y, (int)(255 * 16777216 + (int)color.RGB[0] * 65536 + (int)color.RGB[1] * 256 + (int)color.RGB[2]));//setArgb
			}
			else
				if ( OrigionalPR.getColor( x, y ) != VibrantColors.Magenta.ToFXColor() )//shitBrownNum )
					pw.setArgb( x, y, BasisPR.getColor( x, y ) );
				else
					pw.setArgb( x, y, neonGreen.ToFXColor());//shitBrownNum);//pr.getColor( x, y ) );// */

		pattern2D.SimpleRainbow(ColorsFactor, LocationOfStillMovement, LocationOfColorMovement, x, RepeatFactor);
		rainbowSoftColor.RainbowSoftColorRainbowFunction(Math.abs( ColorsFactor ), sliderValue);//1st Square In SimpleDiagnosticsClass.java
		rgb = rainbowSoftColor.rgb;
		argb = rainbowSoftColor.argb;
		fxColor = rainbowSoftColor.ToFXColor();
		return fxColor;
	}
	public Color[] CustomColorsReverser ( Color[] FXcolorArray )//Reverses Custom Colors By Flipping Around Colors Like Rainbow Reversal Without Changing Any Colors Like Green In Rainbow To Pink In Reversed //
	{
		fxColorArray = new Color[FXcolorArray.length];
		for (int c = 0; c < FXcolorArray.length; c++)
			fxColorArray[c] = FXcolorArray[ FXcolorArray.length - c - 1 ];
		return fxColorArray;
	}
	public double ColorValueFitter ( double ColorToBeChecked )//Makes Sure Colors Don't Cause Systemic Failures //27th Square In SimpleDiagnosticsClass.java
	{
		ColorBeingChecked = Math.abs(ColorToBeChecked);
		while ( ColorBeingChecked > 255)
			ColorBeingChecked = ColorBeingChecked - 255;
		return ColorBeingChecked;
	}
	public double OpacityValueFitter ( double OpacityToBeChecked )//Makes Sure Color Opacitys Don't Cause Systemic Failures //28th Square In SimpleDiagnosticsClass.java
	{
		OpacityBeingChecked = Math.abs(OpacityToBeChecked);
		while ( OpacityBeingChecked > 1)
			OpacityBeingChecked = OpacityBeingChecked - 1;
		return OpacityBeingChecked;
	}
	public void set(double[] ARGB) { argb = ARGB; rgb[0] = ARGB[0]; rgb[1] = ARGB[1]; rgb[2] = ARGB[2]; fxColor = fxColor.rgb( (int)(ColorValueFitter(ARGB[0])), (int)(ColorValueFitter(ARGB[1])), (int)(ColorValueFitter(ARGB[2])), (int)(OpacityValueFitter(ARGB[3])) ); rainbowSoftColor = new RainbowSoftColor( ARGB ); }//Assigns Colors With ARGB //29th Square In SimpleDiagnosticsClass.java
	public void set(Color FXColor) { fxColor = FXColor; argb = new double[] { FXColor.getRed() * 255, FXColor.getGreen() * 255, FXColor.getBlue() * 255, FXColor.getOpacity() }; rainbowSoftColor = new RainbowSoftColor( argb ); }//Assigns Colors With FXColor //30th Square In SimpleDiagnosticsClass.java
	public Object get() { return argb; }//Returns Always Happen With Variable Output With ARGB Functionality //31st Square In SimpleDiagnosticsClass.java
}